﻿using System;
using KMF.Common;
using System.Collections.Generic;
using System.Data.SqlClient;

namespace KMF.DAL
{
	public partial class AgeDb: DbBase
	{

		public static int Add(AgeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Age_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Age_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<AgeDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Age_GetAll");
			try
			{
						
				return dao.GetDTOList<AgeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static AgeDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Age_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<AgeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(AgeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Age_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class AttributeDb: DbBase
	{

		public static int Add(AttributeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Attribute_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@AttributeName",model.AttributeName));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Attribute_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<AttributeDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Attribute_GetAll");
			try
			{
						
				return dao.GetDTOList<AttributeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static AttributeDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Attribute_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<AttributeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(AttributeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Attribute_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@AttributeName",model.AttributeName));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class AttributeCategoryDb: DbBase
	{

		public static int Add(AttributeCategoryDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_AttributeCategory_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@ParentId",model.ParentId));
						command.Parameters.Add(dao.CreateParameter("@CateAttributeName",model.CateAttributeName));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_AttributeCategory_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<AttributeCategoryDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_AttributeCategory_GetAll");
			try
			{
						
				return dao.GetDTOList<AttributeCategoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static AttributeCategoryDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_AttributeCategory_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<AttributeCategoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(AttributeCategoryDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_AttributeCategory_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@ParentId",model.ParentId));
						command.Parameters.Add(dao.CreateParameter("@CateAttributeName",model.CateAttributeName));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class AttributeProductDb: DbBase
	{

		public static int Add(AttributeProductDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_AttributeProduct_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@CateAttributeId",model.CateAttributeId));
						command.Parameters.Add(dao.CreateParameter("@AttributeId",model.AttributeId));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_AttributeProduct_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<AttributeProductDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_AttributeProduct_GetAll");
			try
			{
						
				return dao.GetDTOList<AttributeProductDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static AttributeProductDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_AttributeProduct_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<AttributeProductDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(AttributeProductDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_AttributeProduct_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@CateAttributeId",model.CateAttributeId));
						command.Parameters.Add(dao.CreateParameter("@AttributeId",model.AttributeId));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class BannerDb: DbBase
	{

		public static int Add(BannerDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Banner_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@BannerId",model.BannerId));
						command.Parameters.Add(dao.CreateParameter("@Subject",model.Subject));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@StartDate",model.StartDate));
						command.Parameters.Add(dao.CreateParameter("@ExpireDate",model.ExpireDate));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						command.Parameters.Add(dao.CreateParameter("@UpdateDate",model.UpdateDate));
						command.Parameters.Add(dao.CreateParameter("@PageId",model.PageId));
						command.Parameters.Add(dao.CreateParameter("@PositionId",model.PositionId));
						command.Parameters.Add(dao.CreateParameter("@CategoryId",model.CategoryId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string BannerId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Banner_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@BannerId",BannerId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<BannerDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Banner_GetAll");
			try
			{
						
				return dao.GetDTOList<BannerDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static BannerDto GetById(string BannerId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Banner_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@BannerId",BannerId));
						
				return dao.GetSingleDTO<BannerDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(BannerDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Banner_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@BannerId",model.BannerId));
						command.Parameters.Add(dao.CreateParameter("@Subject",model.Subject));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@StartDate",model.StartDate));
						command.Parameters.Add(dao.CreateParameter("@ExpireDate",model.ExpireDate));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						command.Parameters.Add(dao.CreateParameter("@UpdateDate",model.UpdateDate));
						command.Parameters.Add(dao.CreateParameter("@PageId",model.PageId));
						command.Parameters.Add(dao.CreateParameter("@PositionId",model.PositionId));
						command.Parameters.Add(dao.CreateParameter("@CategoryId",model.CategoryId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class BannerImageDb: DbBase
	{

		public static int Add(BannerImageDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_BannerImage_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@BannerImageId",model.BannerImageId));
						command.Parameters.Add(dao.CreateParameter("@BannerId",model.BannerId));
						command.Parameters.Add(dao.CreateParameter("@Title",model.Title));
						command.Parameters.Add(dao.CreateParameter("@Url",model.Url));
						command.Parameters.Add(dao.CreateParameter("@UrlStatistic",model.UrlStatistic));
						command.Parameters.Add(dao.CreateParameter("@Width",model.Width));
						command.Parameters.Add(dao.CreateParameter("@Height",model.Height));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@Order",model.Order));
						command.Parameters.Add(dao.CreateParameter("@Show",model.Show));
						command.Parameters.Add(dao.CreateParameter("@NoFollow",model.NoFollow));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@UpdateDate",model.UpdateDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string BannerImageId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_BannerImage_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@BannerImageId",BannerImageId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<BannerImageDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_BannerImage_GetAll");
			try
			{
						
				return dao.GetDTOList<BannerImageDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static BannerImageDto GetById(string BannerImageId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_BannerImage_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@BannerImageId",BannerImageId));
						
				return dao.GetSingleDTO<BannerImageDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(BannerImageDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_BannerImage_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@BannerImageId",model.BannerImageId));
						command.Parameters.Add(dao.CreateParameter("@BannerId",model.BannerId));
						command.Parameters.Add(dao.CreateParameter("@Title",model.Title));
						command.Parameters.Add(dao.CreateParameter("@Url",model.Url));
						command.Parameters.Add(dao.CreateParameter("@UrlStatistic",model.UrlStatistic));
						command.Parameters.Add(dao.CreateParameter("@Width",model.Width));
						command.Parameters.Add(dao.CreateParameter("@Height",model.Height));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@Order",model.Order));
						command.Parameters.Add(dao.CreateParameter("@Show",model.Show));
						command.Parameters.Add(dao.CreateParameter("@NoFollow",model.NoFollow));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@UpdateDate",model.UpdateDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class CampaignDb: DbBase
	{

	}
	
	public partial class CampaignCustomerDb: DbBase
	{

	}
	
	public partial class ColorDb: DbBase
	{

		public static int Add(ColorDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Color_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@Code",model.Code));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						command.Parameters.Add(dao.CreateParameter("@ModifyDate",model.ModifyDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Color_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int DeleteColor(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Color_DeleteColor");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ColorDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Color_GetAll");
			try
			{
						
				return dao.GetDTOList<ColorDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static ColorDto GetById(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Color_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<ColorDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(ColorDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Color_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@Code",model.Code));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						command.Parameters.Add(dao.CreateParameter("@ModifyDate",model.ModifyDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class ConfigDb: DbBase
	{

	}
	
	public partial class ContactDb: DbBase
	{

		public static int Add(ContactDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Contact_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@ContactName",model.ContactName));
						command.Parameters.Add(dao.CreateParameter("@Avata",model.Avata));
						command.Parameters.Add(dao.CreateParameter("@Address",model.Address));
						command.Parameters.Add(dao.CreateParameter("@Mobile",model.Mobile));
						command.Parameters.Add(dao.CreateParameter("@Phone",model.Phone));
						command.Parameters.Add(dao.CreateParameter("@Email",model.Email));
						command.Parameters.Add(dao.CreateParameter("@Twitter",model.Twitter));
						command.Parameters.Add(dao.CreateParameter("@Subject",model.Subject));
						command.Parameters.Add(dao.CreateParameter("@Content",model.Content));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Note",model.Note));
						command.Parameters.Add(dao.CreateParameter("@Groups",model.Groups));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Contact_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ContactDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Contact_GetAll");
			try
			{
						
				return dao.GetDTOList<ContactDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static ContactDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Contact_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<ContactDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(ContactDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Contact_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@ContactName",model.ContactName));
						command.Parameters.Add(dao.CreateParameter("@Avata",model.Avata));
						command.Parameters.Add(dao.CreateParameter("@Address",model.Address));
						command.Parameters.Add(dao.CreateParameter("@Mobile",model.Mobile));
						command.Parameters.Add(dao.CreateParameter("@Phone",model.Phone));
						command.Parameters.Add(dao.CreateParameter("@Email",model.Email));
						command.Parameters.Add(dao.CreateParameter("@Twitter",model.Twitter));
						command.Parameters.Add(dao.CreateParameter("@Subject",model.Subject));
						command.Parameters.Add(dao.CreateParameter("@Content",model.Content));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Note",model.Note));
						command.Parameters.Add(dao.CreateParameter("@Groups",model.Groups));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class CountryDb: DbBase
	{

		public static int Add(CountryDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Country_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@ParentId",model.ParentId));
						command.Parameters.Add(dao.CreateParameter("@CountryName",model.CountryName));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Country_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<CountryDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Country_GetAll");
			try
			{
						
				return dao.GetDTOList<CountryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static CountryDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Country_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<CountryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(CountryDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Country_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@ParentId",model.ParentId));
						command.Parameters.Add(dao.CreateParameter("@CountryName",model.CountryName));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class CustomerDb: DbBase
	{

		public static int Add(CustomerDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Customer_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Password",model.Password));
						command.Parameters.Add(dao.CreateParameter("@PasswordSalt",model.PasswordSalt));
						command.Parameters.Add(dao.CreateParameter("@FullName",model.FullName));
						command.Parameters.Add(dao.CreateParameter("@Email",model.Email));
						command.Parameters.Add(dao.CreateParameter("@Birthday",model.Birthday));
						command.Parameters.Add(dao.CreateParameter("@Gender",model.Gender));
						command.Parameters.Add(dao.CreateParameter("@Address",model.Address));
						command.Parameters.Add(dao.CreateParameter("@Telephone",model.Telephone));
						command.Parameters.Add(dao.CreateParameter("@Mobilephone",model.Mobilephone));
						command.Parameters.Add(dao.CreateParameter("@Fax",model.Fax));
						command.Parameters.Add(dao.CreateParameter("@CompanyName",model.CompanyName));
						command.Parameters.Add(dao.CreateParameter("@CompanyAddress",model.CompanyAddress));
						command.Parameters.Add(dao.CreateParameter("@CompanyPhone",model.CompanyPhone));
						command.Parameters.Add(dao.CreateParameter("@ProvinceId",model.ProvinceId));
						command.Parameters.Add(dao.CreateParameter("@ProvinceName",model.ProvinceName));
						command.Parameters.Add(dao.CreateParameter("@DistrictId",model.DistrictId));
						command.Parameters.Add(dao.CreateParameter("@DistrictName",model.DistrictName));
						command.Parameters.Add(dao.CreateParameter("@CountryId",model.CountryId));
						command.Parameters.Add(dao.CreateParameter("@ActivateCode",model.ActivateCode));
						command.Parameters.Add(dao.CreateParameter("@AvatarPath",model.AvatarPath));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						command.Parameters.Add(dao.CreateParameter("@EmailStatus",model.EmailStatus));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Customer_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<CustomerDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Customer_GetAll");
			try
			{
						
				return dao.GetDTOList<CustomerDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static CustomerDto GetByEmail(string Email)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Customer_GetByEmail");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Email",Email));
						
				return dao.GetSingleDTO<CustomerDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static CustomerDto GetById(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Customer_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<CustomerDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(CustomerDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Customer_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Password",model.Password));
						command.Parameters.Add(dao.CreateParameter("@PasswordSalt",model.PasswordSalt));
						command.Parameters.Add(dao.CreateParameter("@FullName",model.FullName));
						command.Parameters.Add(dao.CreateParameter("@Email",model.Email));
						command.Parameters.Add(dao.CreateParameter("@Birthday",model.Birthday));
						command.Parameters.Add(dao.CreateParameter("@Gender",model.Gender));
						command.Parameters.Add(dao.CreateParameter("@Address",model.Address));
						command.Parameters.Add(dao.CreateParameter("@Telephone",model.Telephone));
						command.Parameters.Add(dao.CreateParameter("@Mobilephone",model.Mobilephone));
						command.Parameters.Add(dao.CreateParameter("@Fax",model.Fax));
						command.Parameters.Add(dao.CreateParameter("@CompanyName",model.CompanyName));
						command.Parameters.Add(dao.CreateParameter("@CompanyAddress",model.CompanyAddress));
						command.Parameters.Add(dao.CreateParameter("@CompanyPhone",model.CompanyPhone));
						command.Parameters.Add(dao.CreateParameter("@ProvinceId",model.ProvinceId));
						command.Parameters.Add(dao.CreateParameter("@ProvinceName",model.ProvinceName));
						command.Parameters.Add(dao.CreateParameter("@DistrictId",model.DistrictId));
						command.Parameters.Add(dao.CreateParameter("@DistrictName",model.DistrictName));
						command.Parameters.Add(dao.CreateParameter("@CountryId",model.CountryId));
						command.Parameters.Add(dao.CreateParameter("@ActivateCode",model.ActivateCode));
						command.Parameters.Add(dao.CreateParameter("@AvatarPath",model.AvatarPath));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						command.Parameters.Add(dao.CreateParameter("@EmailStatus",model.EmailStatus));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class DiscountDb: DbBase
	{

		public static int Add(DiscountDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Discount_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@DiscountTypeId",model.DiscountTypeId));
						command.Parameters.Add(dao.CreateParameter("@UsePercentage",model.UsePercentage));
						command.Parameters.Add(dao.CreateParameter("@DiscountPercentage",model.DiscountPercentage));
						command.Parameters.Add(dao.CreateParameter("@DiscountAmount",model.DiscountAmount));
						command.Parameters.Add(dao.CreateParameter("@StartDate",model.StartDate));
						command.Parameters.Add(dao.CreateParameter("@EndDate",model.EndDate));
						command.Parameters.Add(dao.CreateParameter("@RequiresCouponCode",model.RequiresCouponCode));
						command.Parameters.Add(dao.CreateParameter("@CouponCode",model.CouponCode));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@DiscountLimitationId",model.DiscountLimitationId));
						command.Parameters.Add(dao.CreateParameter("@LimitationTimes",model.LimitationTimes));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						command.Parameters.Add(dao.CreateParameter("@UpdatedDate",model.UpdatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int DiscountId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Discount_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@DiscountId",DiscountId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<DiscountDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Discount_GetAll");
			try
			{
						
				return dao.GetDTOList<DiscountDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static DiscountDto GetById(int DiscountId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Discount_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@DiscountId",DiscountId));
						
				return dao.GetSingleDTO<DiscountDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(DiscountDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Discount_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@DiscountId",model.DiscountId));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@DiscountTypeId",model.DiscountTypeId));
						command.Parameters.Add(dao.CreateParameter("@UsePercentage",model.UsePercentage));
						command.Parameters.Add(dao.CreateParameter("@DiscountPercentage",model.DiscountPercentage));
						command.Parameters.Add(dao.CreateParameter("@DiscountAmount",model.DiscountAmount));
						command.Parameters.Add(dao.CreateParameter("@StartDate",model.StartDate));
						command.Parameters.Add(dao.CreateParameter("@EndDate",model.EndDate));
						command.Parameters.Add(dao.CreateParameter("@RequiresCouponCode",model.RequiresCouponCode));
						command.Parameters.Add(dao.CreateParameter("@CouponCode",model.CouponCode));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@DiscountLimitationId",model.DiscountLimitationId));
						command.Parameters.Add(dao.CreateParameter("@LimitationTimes",model.LimitationTimes));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						command.Parameters.Add(dao.CreateParameter("@UpdatedDate",model.UpdatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class DiscountApplyToCategoryDb: DbBase
	{

		public static int Add(DiscountApplyToCategoryDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountApplyToCategory_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@DiscountId",model.DiscountId));
						command.Parameters.Add(dao.CreateParameter("@CategoryId",model.CategoryId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int DiscountId,string CategoryId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountApplyToCategory_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@DiscountId",DiscountId));
						command.Parameters.Add(dao.CreateParameter("@CategoryId",CategoryId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<DiscountApplyToCategoryDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountApplyToCategory_GetAll");
			try
			{
						
				return dao.GetDTOList<DiscountApplyToCategoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class DiscountApplyToProductDb: DbBase
	{

		public static int Add(DiscountApplyToProductDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountApplyToProduct_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@DiscountId",model.DiscountId));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int DiscountId,string ProductId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountApplyToProduct_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@DiscountId",DiscountId));
						command.Parameters.Add(dao.CreateParameter("@ProductId",ProductId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<DiscountApplyToProductDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountApplyToProduct_GetAll");
			try
			{
						
				return dao.GetDTOList<DiscountApplyToProductDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class DiscountLimitationDb: DbBase
	{

		public static int Add(DiscountLimitationDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountLimitation_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountLimitation_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<DiscountLimitationDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountLimitation_GetAll");
			try
			{
						
				return dao.GetDTOList<DiscountLimitationDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static DiscountLimitationDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountLimitation_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<DiscountLimitationDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(DiscountLimitationDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountLimitation_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class DiscountRequirementDb: DbBase
	{

		public static int Add(DiscountRequirementDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountRequirement_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@DiscountId",model.DiscountId));
						command.Parameters.Add(dao.CreateParameter("@DiscountRequirementRuleSystemName",model.DiscountRequirementRuleSystemName));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountRequirement_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<DiscountRequirementDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountRequirement_GetAll");
			try
			{
						
				return dao.GetDTOList<DiscountRequirementDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static DiscountRequirementDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountRequirement_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<DiscountRequirementDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(DiscountRequirementDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountRequirement_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@DiscountId",model.DiscountId));
						command.Parameters.Add(dao.CreateParameter("@DiscountRequirementRuleSystemName",model.DiscountRequirementRuleSystemName));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class DiscountRequirementTypeDb: DbBase
	{

		public static int Add(DiscountRequirementTypeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountRequirementType_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountRequirementType_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<DiscountRequirementTypeDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountRequirementType_GetAll");
			try
			{
						
				return dao.GetDTOList<DiscountRequirementTypeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static DiscountRequirementTypeDto GetById(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountRequirementType_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<DiscountRequirementTypeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(DiscountRequirementTypeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountRequirementType_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class DiscountTypeDb: DbBase
	{

		public static int Add(DiscountTypeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountType_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountType_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<DiscountTypeDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountType_GetAll");
			try
			{
						
				return dao.GetDTOList<DiscountTypeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static DiscountTypeDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountType_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<DiscountTypeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(DiscountTypeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountType_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class DiscountUsageHistoryDb: DbBase
	{

		public static int Add(DiscountUsageHistoryDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountUsageHistory_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@DiscountId",model.DiscountId));
						command.Parameters.Add(dao.CreateParameter("@OrderId",model.OrderId));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountUsageHistory_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<DiscountUsageHistoryDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountUsageHistory_GetAll");
			try
			{
						
				return dao.GetDTOList<DiscountUsageHistoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static DiscountUsageHistoryDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountUsageHistory_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<DiscountUsageHistoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(DiscountUsageHistoryDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_DiscountUsageHistory_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@DiscountId",model.DiscountId));
						command.Parameters.Add(dao.CreateParameter("@OrderId",model.OrderId));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class GiftDb: DbBase
	{

		public static int Add(GiftDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Gift_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@GiftTypeId",model.GiftTypeId));
						command.Parameters.Add(dao.CreateParameter("@RequiresCouponCode",model.RequiresCouponCode));
						command.Parameters.Add(dao.CreateParameter("@CouponCode",model.CouponCode));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@GiftLimitationId",model.GiftLimitationId));
						command.Parameters.Add(dao.CreateParameter("@LimitationTimes",model.LimitationTimes));
						command.Parameters.Add(dao.CreateParameter("@StartDate",model.StartDate));
						command.Parameters.Add(dao.CreateParameter("@EndDate",model.EndDate));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int GiftId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Gift_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@GiftId",GiftId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<GiftDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Gift_GetAll");
			try
			{
						
				return dao.GetDTOList<GiftDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static GiftDto GetById(int GiftId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Gift_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@GiftId",GiftId));
						
				return dao.GetSingleDTO<GiftDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(GiftDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Gift_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@GiftId",model.GiftId));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@GiftTypeId",model.GiftTypeId));
						command.Parameters.Add(dao.CreateParameter("@RequiresCouponCode",model.RequiresCouponCode));
						command.Parameters.Add(dao.CreateParameter("@CouponCode",model.CouponCode));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@GiftLimitationId",model.GiftLimitationId));
						command.Parameters.Add(dao.CreateParameter("@LimitationTimes",model.LimitationTimes));
						command.Parameters.Add(dao.CreateParameter("@StartDate",model.StartDate));
						command.Parameters.Add(dao.CreateParameter("@EndDate",model.EndDate));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class GiftApplyToCategoryDb: DbBase
	{

		public static int Add(GiftApplyToCategoryDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftApplyToCategory_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@GiftId",model.GiftId));
						command.Parameters.Add(dao.CreateParameter("@CategoryId",model.CategoryId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int GiftId,string CategoryId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftApplyToCategory_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@GiftId",GiftId));
						command.Parameters.Add(dao.CreateParameter("@CategoryId",CategoryId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<GiftApplyToCategoryDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftApplyToCategory_GetAll");
			try
			{
						
				return dao.GetDTOList<GiftApplyToCategoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class GiftApplyToProductDb: DbBase
	{

		public static int Add(GiftApplyToProductDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftApplyToProduct_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@GiftId",model.GiftId));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int GiftId,string ProductId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftApplyToProduct_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@GiftId",GiftId));
						command.Parameters.Add(dao.CreateParameter("@ProductId",ProductId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<GiftApplyToProductDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftApplyToProduct_GetAll");
			try
			{
						
				return dao.GetDTOList<GiftApplyToProductDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class GiftLimitationDb: DbBase
	{

		public static int Add(GiftLimitationDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftLimitation_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftLimitation_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<GiftLimitationDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftLimitation_GetAll");
			try
			{
						
				return dao.GetDTOList<GiftLimitationDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static GiftLimitationDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftLimitation_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<GiftLimitationDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(GiftLimitationDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftLimitation_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class GiftProductDb: DbBase
	{

		public static int Add(GiftProductDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftProduct_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@GiftId",model.GiftId));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int GiftId,string ProductId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftProduct_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@GiftId",GiftId));
						command.Parameters.Add(dao.CreateParameter("@ProductId",ProductId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<GiftProductDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftProduct_GetAll");
			try
			{
						
				return dao.GetDTOList<GiftProductDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class GiftRequirementDb: DbBase
	{

		public static int Add(GiftRequirementDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftRequirement_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@GiftId",model.GiftId));
						command.Parameters.Add(dao.CreateParameter("@GiftRequirementRuleSystemName",model.GiftRequirementRuleSystemName));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftRequirement_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<GiftRequirementDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftRequirement_GetAll");
			try
			{
						
				return dao.GetDTOList<GiftRequirementDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static GiftRequirementDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftRequirement_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<GiftRequirementDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(GiftRequirementDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftRequirement_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@GiftId",model.GiftId));
						command.Parameters.Add(dao.CreateParameter("@GiftRequirementRuleSystemName",model.GiftRequirementRuleSystemName));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class GiftRequirementTypeDb: DbBase
	{

		public static int Add(GiftRequirementTypeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftRequirementType_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftRequirementType_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<GiftRequirementTypeDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftRequirementType_GetAll");
			try
			{
						
				return dao.GetDTOList<GiftRequirementTypeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static GiftRequirementTypeDto GetById(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftRequirementType_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<GiftRequirementTypeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(GiftRequirementTypeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftRequirementType_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class GiftTypeDb: DbBase
	{

		public static int Add(GiftTypeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftType_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftType_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<GiftTypeDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftType_GetAll");
			try
			{
						
				return dao.GetDTOList<GiftTypeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static GiftTypeDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftType_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<GiftTypeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(GiftTypeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftType_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class GiftUsageHistoryDb: DbBase
	{

		public static int Add(GiftUsageHistoryDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftUsageHistory_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@GiftId",model.GiftId));
						command.Parameters.Add(dao.CreateParameter("@OrderId",model.OrderId));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftUsageHistory_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<GiftUsageHistoryDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftUsageHistory_GetAll");
			try
			{
						
				return dao.GetDTOList<GiftUsageHistoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static GiftUsageHistoryDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftUsageHistory_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<GiftUsageHistoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(GiftUsageHistoryDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GiftUsageHistory_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@GiftId",model.GiftId));
						command.Parameters.Add(dao.CreateParameter("@OrderId",model.OrderId));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class GoldenTimeCampainDb: DbBase
	{

		public static int Add(GoldenTimeCampainDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GoldenTimeCampain_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@CampainName",model.CampainName));
						command.Parameters.Add(dao.CreateParameter("@FromHour",model.FromHour));
						command.Parameters.Add(dao.CreateParameter("@ToHour",model.ToHour));
						command.Parameters.Add(dao.CreateParameter("@DateBegin",model.DateBegin));
						command.Parameters.Add(dao.CreateParameter("@DateEnd",model.DateEnd));
						command.Parameters.Add(dao.CreateParameter("@CountProduct",model.CountProduct));
						command.Parameters.Add(dao.CreateParameter("@CountDate",model.CountDate));
						command.Parameters.Add(dao.CreateParameter("@CountOrder",model.CountOrder));
						command.Parameters.Add(dao.CreateParameter("@TotalPrice",model.TotalPrice));
						command.Parameters.Add(dao.CreateParameter("@CusWin",model.CusWin));
						command.Parameters.Add(dao.CreateParameter("@Random",model.Random));
						command.Parameters.Add(dao.CreateParameter("@Status",model.Status));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GoldenTimeCampain_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<GoldenTimeCampainDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GoldenTimeCampain_GetAll");
			try
			{
						
				return dao.GetDTOList<GoldenTimeCampainDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static GoldenTimeCampainDto GetById(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GoldenTimeCampain_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<GoldenTimeCampainDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(GoldenTimeCampainDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GoldenTimeCampain_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@CampainName",model.CampainName));
						command.Parameters.Add(dao.CreateParameter("@FromHour",model.FromHour));
						command.Parameters.Add(dao.CreateParameter("@ToHour",model.ToHour));
						command.Parameters.Add(dao.CreateParameter("@DateBegin",model.DateBegin));
						command.Parameters.Add(dao.CreateParameter("@DateEnd",model.DateEnd));
						command.Parameters.Add(dao.CreateParameter("@CountProduct",model.CountProduct));
						command.Parameters.Add(dao.CreateParameter("@CountDate",model.CountDate));
						command.Parameters.Add(dao.CreateParameter("@CountOrder",model.CountOrder));
						command.Parameters.Add(dao.CreateParameter("@TotalPrice",model.TotalPrice));
						command.Parameters.Add(dao.CreateParameter("@CusWin",model.CusWin));
						command.Parameters.Add(dao.CreateParameter("@Random",model.Random));
						command.Parameters.Add(dao.CreateParameter("@Status",model.Status));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class GoldenTimeCusBoughtDb: DbBase
	{

		public static int Add(GoldenTimeCusBoughtDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GoldenTimeCusBought_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@GoldenTimeProductId",model.GoldenTimeProductId));
						command.Parameters.Add(dao.CreateParameter("@CustomerId",model.CustomerId));
						command.Parameters.Add(dao.CreateParameter("@CampainId",model.CampainId));
						command.Parameters.Add(dao.CreateParameter("@TotalPrice",model.TotalPrice));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GoldenTimeCusBought_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<GoldenTimeCusBoughtDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GoldenTimeCusBought_GetAll");
			try
			{
						
				return dao.GetDTOList<GoldenTimeCusBoughtDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static GoldenTimeCusBoughtDto GetById(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GoldenTimeCusBought_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<GoldenTimeCusBoughtDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(GoldenTimeCusBoughtDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GoldenTimeCusBought_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@GoldenTimeProductId",model.GoldenTimeProductId));
						command.Parameters.Add(dao.CreateParameter("@CustomerId",model.CustomerId));
						command.Parameters.Add(dao.CreateParameter("@CampainId",model.CampainId));
						command.Parameters.Add(dao.CreateParameter("@TotalPrice",model.TotalPrice));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class GoldenTimeProductDb: DbBase
	{

		public static int Add(GoldenTimeProductDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GoldenTimeProduct_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@CampaintId",model.CampaintId));
						command.Parameters.Add(dao.CreateParameter("@CategoryIdParent",model.CategoryIdParent));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@PromotionUnit",model.PromotionUnit));
						command.Parameters.Add(dao.CreateParameter("@PriceUnit",model.PriceUnit));
						command.Parameters.Add(dao.CreateParameter("@QuantyUnit",model.QuantyUnit));
						command.Parameters.Add(dao.CreateParameter("@ViewTime",model.ViewTime));
						command.Parameters.Add(dao.CreateParameter("@IsHot",model.IsHot));
						command.Parameters.Add(dao.CreateParameter("@TimeShow",model.TimeShow));
						command.Parameters.Add(dao.CreateParameter("@Bought",model.Bought));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GoldenTimeProduct_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<GoldenTimeProductDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GoldenTimeProduct_GetAll");
			try
			{
						
				return dao.GetDTOList<GoldenTimeProductDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static GoldenTimeProductDto GetById(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GoldenTimeProduct_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<GoldenTimeProductDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(GoldenTimeProductDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_GoldenTimeProduct_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@CampaintId",model.CampaintId));
						command.Parameters.Add(dao.CreateParameter("@CategoryIdParent",model.CategoryIdParent));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@PromotionUnit",model.PromotionUnit));
						command.Parameters.Add(dao.CreateParameter("@PriceUnit",model.PriceUnit));
						command.Parameters.Add(dao.CreateParameter("@QuantyUnit",model.QuantyUnit));
						command.Parameters.Add(dao.CreateParameter("@ViewTime",model.ViewTime));
						command.Parameters.Add(dao.CreateParameter("@IsHot",model.IsHot));
						command.Parameters.Add(dao.CreateParameter("@TimeShow",model.TimeShow));
						command.Parameters.Add(dao.CreateParameter("@Bought",model.Bought));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class HelpDb: DbBase
	{

		public static int Add(HelpDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Help_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@HelpCategoryId",model.HelpCategoryId));
						command.Parameters.Add(dao.CreateParameter("@Title",model.Title));
						command.Parameters.Add(dao.CreateParameter("@Content",model.Content));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Help_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<HelpDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Help_GetAll");
			try
			{
						
				return dao.GetDTOList<HelpDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static HelpDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Help_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<HelpDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(HelpDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Help_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@HelpCategoryId",model.HelpCategoryId));
						command.Parameters.Add(dao.CreateParameter("@Title",model.Title));
						command.Parameters.Add(dao.CreateParameter("@Content",model.Content));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class HelpCategoryDb: DbBase
	{

		public static int Add(HelpCategoryDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_HelpCategory_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@CategoryName",model.CategoryName));
						command.Parameters.Add(dao.CreateParameter("@ParentId",model.ParentId));
						command.Parameters.Add(dao.CreateParameter("@Depth",model.Depth));
						command.Parameters.Add(dao.CreateParameter("@BreadCrumb",model.BreadCrumb));
						command.Parameters.Add(dao.CreateParameter("@Summary",model.Summary));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Icon",model.Icon));
						command.Parameters.Add(dao.CreateParameter("@Url",model.Url));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@MetaKeyword",model.MetaKeyword));
						command.Parameters.Add(dao.CreateParameter("@MetaDescription",model.MetaDescription));
						command.Parameters.Add(dao.CreateParameter("@Keyword",model.Keyword));
						command.Parameters.Add(dao.CreateParameter("@IsHot",model.IsHot));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_HelpCategory_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<HelpCategoryDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_HelpCategory_GetAll");
			try
			{
						
				return dao.GetDTOList<HelpCategoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static HelpCategoryDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_HelpCategory_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<HelpCategoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(HelpCategoryDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_HelpCategory_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@CategoryName",model.CategoryName));
						command.Parameters.Add(dao.CreateParameter("@ParentId",model.ParentId));
						command.Parameters.Add(dao.CreateParameter("@Depth",model.Depth));
						command.Parameters.Add(dao.CreateParameter("@BreadCrumb",model.BreadCrumb));
						command.Parameters.Add(dao.CreateParameter("@Summary",model.Summary));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Icon",model.Icon));
						command.Parameters.Add(dao.CreateParameter("@Url",model.Url));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@MetaKeyword",model.MetaKeyword));
						command.Parameters.Add(dao.CreateParameter("@MetaDescription",model.MetaDescription));
						command.Parameters.Add(dao.CreateParameter("@Keyword",model.Keyword));
						command.Parameters.Add(dao.CreateParameter("@IsHot",model.IsHot));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class NewsDb: DbBase
	{

		public static int Add(NewsDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_News_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@CategoryId",model.CategoryId));
						command.Parameters.Add(dao.CreateParameter("@Title",model.Title));
						command.Parameters.Add(dao.CreateParameter("@Summary",model.Summary));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@MetaTitle",model.MetaTitle));
						command.Parameters.Add(dao.CreateParameter("@MetaDescription",model.MetaDescription));
						command.Parameters.Add(dao.CreateParameter("@MetaKeyword",model.MetaKeyword));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Keyword",model.Keyword));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@Hot",model.Hot));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_News_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<NewsDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_News_GetAll");
			try
			{
						
				return dao.GetDTOList<NewsDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static NewsDto GetById(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_News_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<NewsDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(NewsDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_News_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@CategoryId",model.CategoryId));
						command.Parameters.Add(dao.CreateParameter("@Title",model.Title));
						command.Parameters.Add(dao.CreateParameter("@Summary",model.Summary));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@MetaTitle",model.MetaTitle));
						command.Parameters.Add(dao.CreateParameter("@MetaDescription",model.MetaDescription));
						command.Parameters.Add(dao.CreateParameter("@MetaKeyword",model.MetaKeyword));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Keyword",model.Keyword));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@Hot",model.Hot));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class NewsCategoryDb: DbBase
	{

		public static int Add(NewsCategoryDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_NewsCategory_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@CateName",model.CateName));
						command.Parameters.Add(dao.CreateParameter("@ParentId",model.ParentId));
						command.Parameters.Add(dao.CreateParameter("@Depth",model.Depth));
						command.Parameters.Add(dao.CreateParameter("@BreadCrumb",model.BreadCrumb));
						command.Parameters.Add(dao.CreateParameter("@Summary",model.Summary));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Icon",model.Icon));
						command.Parameters.Add(dao.CreateParameter("@Url",model.Url));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@MetaTitle",model.MetaTitle));
						command.Parameters.Add(dao.CreateParameter("@MetaKeyword",model.MetaKeyword));
						command.Parameters.Add(dao.CreateParameter("@MetaDescription",model.MetaDescription));
						command.Parameters.Add(dao.CreateParameter("@Keyword",model.Keyword));
						command.Parameters.Add(dao.CreateParameter("@IsHot",model.IsHot));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Type",model.Type));
						command.Parameters.Add(dao.CreateParameter("@ShowHome",model.ShowHome));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_NewsCategory_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<NewsCategoryDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_NewsCategory_GetAll");
			try
			{
						
				return dao.GetDTOList<NewsCategoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static NewsCategoryDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_NewsCategory_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<NewsCategoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(NewsCategoryDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_NewsCategory_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@CateName",model.CateName));
						command.Parameters.Add(dao.CreateParameter("@ParentId",model.ParentId));
						command.Parameters.Add(dao.CreateParameter("@Depth",model.Depth));
						command.Parameters.Add(dao.CreateParameter("@BreadCrumb",model.BreadCrumb));
						command.Parameters.Add(dao.CreateParameter("@Summary",model.Summary));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Icon",model.Icon));
						command.Parameters.Add(dao.CreateParameter("@Url",model.Url));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@MetaTitle",model.MetaTitle));
						command.Parameters.Add(dao.CreateParameter("@MetaKeyword",model.MetaKeyword));
						command.Parameters.Add(dao.CreateParameter("@MetaDescription",model.MetaDescription));
						command.Parameters.Add(dao.CreateParameter("@Keyword",model.Keyword));
						command.Parameters.Add(dao.CreateParameter("@IsHot",model.IsHot));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Type",model.Type));
						command.Parameters.Add(dao.CreateParameter("@ShowHome",model.ShowHome));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class NewsCommentDb: DbBase
	{

		public static int Add(NewsCommentDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_NewsComment_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@CustomerId",model.CustomerId));
						command.Parameters.Add(dao.CreateParameter("@NewsId",model.NewsId));
						command.Parameters.Add(dao.CreateParameter("@Title",model.Title));
						command.Parameters.Add(dao.CreateParameter("@Content",model.Content));
						command.Parameters.Add(dao.CreateParameter("@Email",model.Email));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@UpdateDate",model.UpdateDate));
						command.Parameters.Add(dao.CreateParameter("@Star",model.Star));
						command.Parameters.Add(dao.CreateParameter("@Agree",model.Agree));
						command.Parameters.Add(dao.CreateParameter("@Disagree",model.Disagree));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_NewsComment_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<NewsCommentDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_NewsComment_GetAll");
			try
			{
						
				return dao.GetDTOList<NewsCommentDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static NewsCommentDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_NewsComment_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<NewsCommentDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(NewsCommentDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_NewsComment_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@CustomerId",model.CustomerId));
						command.Parameters.Add(dao.CreateParameter("@NewsId",model.NewsId));
						command.Parameters.Add(dao.CreateParameter("@Title",model.Title));
						command.Parameters.Add(dao.CreateParameter("@Content",model.Content));
						command.Parameters.Add(dao.CreateParameter("@Email",model.Email));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@UpdateDate",model.UpdateDate));
						command.Parameters.Add(dao.CreateParameter("@Star",model.Star));
						command.Parameters.Add(dao.CreateParameter("@Agree",model.Agree));
						command.Parameters.Add(dao.CreateParameter("@Disagree",model.Disagree));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class OrderDb: DbBase
	{

		public static int Add(OrderDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Order_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@OrderId",model.OrderId));
						command.Parameters.Add(dao.CreateParameter("@CustomerId",model.CustomerId));
						command.Parameters.Add(dao.CreateParameter("@TotalMoney",model.TotalMoney));
						command.Parameters.Add(dao.CreateParameter("@Discount",model.Discount));
						command.Parameters.Add(dao.CreateParameter("@Transport",model.Transport));
						command.Parameters.Add(dao.CreateParameter("@Payment",model.Payment));
						command.Parameters.Add(dao.CreateParameter("@Comment",model.Comment));
						command.Parameters.Add(dao.CreateParameter("@ShippingCost",model.ShippingCost));
						command.Parameters.Add(dao.CreateParameter("@FullName",model.FullName));
						command.Parameters.Add(dao.CreateParameter("@Email",model.Email));
						command.Parameters.Add(dao.CreateParameter("@Telephone",model.Telephone));
						command.Parameters.Add(dao.CreateParameter("@MobilePhone",model.MobilePhone));
						command.Parameters.Add(dao.CreateParameter("@Address",model.Address));
						command.Parameters.Add(dao.CreateParameter("@DistrictId",model.DistrictId));
						command.Parameters.Add(dao.CreateParameter("@DistrictName",model.DistrictName));
						command.Parameters.Add(dao.CreateParameter("@ProvinceId",model.ProvinceId));
						command.Parameters.Add(dao.CreateParameter("@ProvinceName",model.ProvinceName));
						command.Parameters.Add(dao.CreateParameter("@EmailStatus",model.EmailStatus));
						command.Parameters.Add(dao.CreateParameter("@Gender",model.Gender));
						command.Parameters.Add(dao.CreateParameter("@Birthday",model.Birthday));
						command.Parameters.Add(dao.CreateParameter("@ReceiveDate",model.ReceiveDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string OrderId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Order_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@OrderId",OrderId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<OrderDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Order_GetAll");
			try
			{
						
				return dao.GetDTOList<OrderDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static OrderDto GetById(string OrderId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Order_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@OrderId",OrderId));
						
				return dao.GetSingleDTO<OrderDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(OrderDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Order_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@OrderId",model.OrderId));
						command.Parameters.Add(dao.CreateParameter("@CustomerId",model.CustomerId));
						command.Parameters.Add(dao.CreateParameter("@TotalMoney",model.TotalMoney));
						command.Parameters.Add(dao.CreateParameter("@Discount",model.Discount));
						command.Parameters.Add(dao.CreateParameter("@Transport",model.Transport));
						command.Parameters.Add(dao.CreateParameter("@Payment",model.Payment));
						command.Parameters.Add(dao.CreateParameter("@Comment",model.Comment));
						command.Parameters.Add(dao.CreateParameter("@ShippingCost",model.ShippingCost));
						command.Parameters.Add(dao.CreateParameter("@FullName",model.FullName));
						command.Parameters.Add(dao.CreateParameter("@Email",model.Email));
						command.Parameters.Add(dao.CreateParameter("@Telephone",model.Telephone));
						command.Parameters.Add(dao.CreateParameter("@MobilePhone",model.MobilePhone));
						command.Parameters.Add(dao.CreateParameter("@Address",model.Address));
						command.Parameters.Add(dao.CreateParameter("@DistrictId",model.DistrictId));
						command.Parameters.Add(dao.CreateParameter("@DistrictName",model.DistrictName));
						command.Parameters.Add(dao.CreateParameter("@ProvinceId",model.ProvinceId));
						command.Parameters.Add(dao.CreateParameter("@ProvinceName",model.ProvinceName));
						command.Parameters.Add(dao.CreateParameter("@EmailStatus",model.EmailStatus));
						command.Parameters.Add(dao.CreateParameter("@Gender",model.Gender));
						command.Parameters.Add(dao.CreateParameter("@Birthday",model.Birthday));
						command.Parameters.Add(dao.CreateParameter("@ReceiveDate",model.ReceiveDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class OrderDetailDb: DbBase
	{

		public static int Add(OrderDetailDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_OrderDetail_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@OrderId",model.OrderId));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@Quantity",model.Quantity));
						command.Parameters.Add(dao.CreateParameter("@Price",model.Price));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(long Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_OrderDetail_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<OrderDetailDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_OrderDetail_GetAll");
			try
			{
						
				return dao.GetDTOList<OrderDetailDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static OrderDetailDto GetById(long Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_OrderDetail_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<OrderDetailDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(OrderDetailDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_OrderDetail_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@OrderId",model.OrderId));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@Quantity",model.Quantity));
						command.Parameters.Add(dao.CreateParameter("@Price",model.Price));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class PageDb: DbBase
	{

		public static int Add(PageDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Page_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@PageKey",model.PageKey));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Order",model.Order));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int PageId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Page_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@PageId",PageId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<PageDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Page_GetAll");
			try
			{
						
				return dao.GetDTOList<PageDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static PageDto GetById(int PageId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Page_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@PageId",PageId));
						
				return dao.GetSingleDTO<PageDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(PageDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Page_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@PageId",model.PageId));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@PageKey",model.PageKey));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Order",model.Order));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class PositionDb: DbBase
	{

		public static int Add(PositionDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Position_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@PageId",model.PageId));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@PositionKey",model.PositionKey));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Order",model.Order));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int PositionId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Position_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@PositionId",PositionId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<PositionDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Position_GetAll");
			try
			{
						
				return dao.GetDTOList<PositionDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static PositionDto GetById(int PositionId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Position_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@PositionId",PositionId));
						
				return dao.GetSingleDTO<PositionDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(PositionDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Position_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@PositionId",model.PositionId));
						command.Parameters.Add(dao.CreateParameter("@PageId",model.PageId));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@PositionKey",model.PositionKey));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Order",model.Order));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class ProductDb: DbBase
	{

		public static int Add(ProductDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Product_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Barcode",model.Barcode));
						command.Parameters.Add(dao.CreateParameter("@CategoryId",model.CategoryId));
						command.Parameters.Add(dao.CreateParameter("@ProviderId",model.ProviderId));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@NameUnsign",model.NameUnsign));
						command.Parameters.Add(dao.CreateParameter("@Summary",model.Summary));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@MetaTitle",model.MetaTitle));
						command.Parameters.Add(dao.CreateParameter("@MetaDescription",model.MetaDescription));
						command.Parameters.Add(dao.CreateParameter("@MetaKeyword",model.MetaKeyword));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@Show",model.Show));
						command.Parameters.Add(dao.CreateParameter("@Price",model.Price));
						command.Parameters.Add(dao.CreateParameter("@Quantity",model.Quantity));
						command.Parameters.Add(dao.CreateParameter("@ProductStatus",model.ProductStatus));
						command.Parameters.Add(dao.CreateParameter("@StockStatus",model.StockStatus));
						command.Parameters.Add(dao.CreateParameter("@CustomInfoFirst",model.CustomInfoFirst));
						command.Parameters.Add(dao.CreateParameter("@CustomInfoSecond",model.CustomInfoSecond));
						command.Parameters.Add(dao.CreateParameter("@CustomInfoThird",model.CustomInfoThird));
						command.Parameters.Add(dao.CreateParameter("@IsShipEnabled",model.IsShipEnabled));
						command.Parameters.Add(dao.CreateParameter("@IsFreeShipping",model.IsFreeShipping));
						command.Parameters.Add(dao.CreateParameter("@TotalView",model.TotalView));
						command.Parameters.Add(dao.CreateParameter("@ProductType",model.ProductType));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@UpdateDate",model.UpdateDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Product_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int DeleteProduct(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Product_DeleteProduct");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Product_GetAll");
			try
			{
						
				return dao.GetDTOList<ProductDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static ProductDto GetById(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Product_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<ProductDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static ProductDto GetByProductId(string ProductId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Product_GetByProductId");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@ProductId",ProductId));
						
				return dao.GetSingleDTO<ProductDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(ProductDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Product_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Barcode",model.Barcode));
						command.Parameters.Add(dao.CreateParameter("@CategoryId",model.CategoryId));
						command.Parameters.Add(dao.CreateParameter("@ProviderId",model.ProviderId));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@NameUnsign",model.NameUnsign));
						command.Parameters.Add(dao.CreateParameter("@Summary",model.Summary));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@MetaTitle",model.MetaTitle));
						command.Parameters.Add(dao.CreateParameter("@MetaDescription",model.MetaDescription));
						command.Parameters.Add(dao.CreateParameter("@MetaKeyword",model.MetaKeyword));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@Show",model.Show));
						command.Parameters.Add(dao.CreateParameter("@Price",model.Price));
						command.Parameters.Add(dao.CreateParameter("@Quantity",model.Quantity));
						command.Parameters.Add(dao.CreateParameter("@ProductStatus",model.ProductStatus));
						command.Parameters.Add(dao.CreateParameter("@StockStatus",model.StockStatus));
						command.Parameters.Add(dao.CreateParameter("@CustomInfoFirst",model.CustomInfoFirst));
						command.Parameters.Add(dao.CreateParameter("@CustomInfoSecond",model.CustomInfoSecond));
						command.Parameters.Add(dao.CreateParameter("@CustomInfoThird",model.CustomInfoThird));
						command.Parameters.Add(dao.CreateParameter("@IsShipEnabled",model.IsShipEnabled));
						command.Parameters.Add(dao.CreateParameter("@IsFreeShipping",model.IsFreeShipping));
						command.Parameters.Add(dao.CreateParameter("@TotalView",model.TotalView));
						command.Parameters.Add(dao.CreateParameter("@ProductType",model.ProductType));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@UpdateDate",model.UpdateDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class ProductBarcodeNewDb: DbBase
	{

		public static int Add(ProductBarcodeNewDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductBarcodeNew_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@ProductIdNew",model.ProductIdNew));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductBarcodeNewDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductBarcodeNew_GetAll");
			try
			{
						
				return dao.GetDTOList<ProductBarcodeNewDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class ProductCategoryDb: DbBase
	{

		public static int Add(ProductCategoryDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategory_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@ParentId",model.ParentId));
						command.Parameters.Add(dao.CreateParameter("@Depth",model.Depth));
						command.Parameters.Add(dao.CreateParameter("@BreadCrumb",model.BreadCrumb));
						command.Parameters.Add(dao.CreateParameter("@Summary",model.Summary));
						command.Parameters.Add(dao.CreateParameter("@SummaryCate",model.SummaryCate));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						command.Parameters.Add(dao.CreateParameter("@Icon",model.Icon));
						command.Parameters.Add(dao.CreateParameter("@Url",model.Url));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@MetaKeyword",model.MetaKeyword));
						command.Parameters.Add(dao.CreateParameter("@MetaDescription",model.MetaDescription));
						command.Parameters.Add(dao.CreateParameter("@Keyword",model.Keyword));
						command.Parameters.Add(dao.CreateParameter("@IsHot",model.IsHot));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						command.Parameters.Add(dao.CreateParameter("@IconPath",model.IconPath));
						command.Parameters.Add(dao.CreateParameter("@ShowHome",model.ShowHome));
						command.Parameters.Add(dao.CreateParameter("@MetaTitle",model.MetaTitle));
						command.Parameters.Add(dao.CreateParameter("@OrderOnHome",model.OrderOnHome));
						command.Parameters.Add(dao.CreateParameter("@PriceRanges",model.PriceRanges));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategory_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int DeleteById(string CategoryId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategory_DeleteById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@CategoryId",CategoryId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductCategoryDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategory_GetAll");
			try
			{
						
				return dao.GetDTOList<ProductCategoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductCategoryDto> GetAllByIdAndBreadCrumb(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategory_GetAllByIdAndBreadCrumb");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetDTOList<ProductCategoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductCategoryDto> GetAllByParentId(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategory_GetAllByParentId");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetDTOList<ProductCategoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductCategoryDto> GetAllByPromotion()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategory_GetAllByPromotion");
			try
			{
						
				return dao.GetDTOList<ProductCategoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductCategoryDto> GetAllByShowHome()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategory_GetAllByShowHome");
			try
			{
						
				return dao.GetDTOList<ProductCategoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductCategoryDto> GetAllCateHasPromotion()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategory_GetAllCateHasPromotion");
			try
			{
						
				return dao.GetDTOList<ProductCategoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductCategoryDto> GetAllCateRoot()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategory_GetAllCateRoot");
			try
			{
						
				return dao.GetDTOList<ProductCategoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static ProductCategoryDto GetById(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategory_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<ProductCategoryDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(ProductCategoryDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategory_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@ParentId",model.ParentId));
						command.Parameters.Add(dao.CreateParameter("@Depth",model.Depth));
						command.Parameters.Add(dao.CreateParameter("@BreadCrumb",model.BreadCrumb));
						command.Parameters.Add(dao.CreateParameter("@Summary",model.Summary));
						command.Parameters.Add(dao.CreateParameter("@SummaryCate",model.SummaryCate));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						command.Parameters.Add(dao.CreateParameter("@Icon",model.Icon));
						command.Parameters.Add(dao.CreateParameter("@Url",model.Url));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@MetaKeyword",model.MetaKeyword));
						command.Parameters.Add(dao.CreateParameter("@MetaDescription",model.MetaDescription));
						command.Parameters.Add(dao.CreateParameter("@Keyword",model.Keyword));
						command.Parameters.Add(dao.CreateParameter("@IsHot",model.IsHot));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						command.Parameters.Add(dao.CreateParameter("@IconPath",model.IconPath));
						command.Parameters.Add(dao.CreateParameter("@ShowHome",model.ShowHome));
						command.Parameters.Add(dao.CreateParameter("@MetaTitle",model.MetaTitle));
						command.Parameters.Add(dao.CreateParameter("@OrderOnHome",model.OrderOnHome));
						command.Parameters.Add(dao.CreateParameter("@PriceRanges",model.PriceRanges));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class ProductCategoryBannerDb: DbBase
	{

		public static int Add(ProductCategoryBannerDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategoryBanner_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@BannerName",model.BannerName));
						command.Parameters.Add(dao.CreateParameter("@CategoryId",model.CategoryId));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@Url",model.Url));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@BeginDate",model.BeginDate));
						command.Parameters.Add(dao.CreateParameter("@EndDate",model.EndDate));
						command.Parameters.Add(dao.CreateParameter("@Width",model.Width));
						command.Parameters.Add(dao.CreateParameter("@Height",model.Height));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Page",model.Page));
						command.Parameters.Add(dao.CreateParameter("@Poi",model.Poi));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategoryBanner_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductCategoryBannerDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategoryBanner_GetAll");
			try
			{
						
				return dao.GetDTOList<ProductCategoryBannerDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static ProductCategoryBannerDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategoryBanner_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<ProductCategoryBannerDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(ProductCategoryBannerDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategoryBanner_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@BannerName",model.BannerName));
						command.Parameters.Add(dao.CreateParameter("@CategoryId",model.CategoryId));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@Url",model.Url));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@BeginDate",model.BeginDate));
						command.Parameters.Add(dao.CreateParameter("@EndDate",model.EndDate));
						command.Parameters.Add(dao.CreateParameter("@Width",model.Width));
						command.Parameters.Add(dao.CreateParameter("@Height",model.Height));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Page",model.Page));
						command.Parameters.Add(dao.CreateParameter("@Poi",model.Poi));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class ProductCategoryMapLinkDb: DbBase
	{

		public static int Add(ProductCategoryMapLinkDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategoryMapLink_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@CategoryId",model.CategoryId));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@Url",model.Url));
						command.Parameters.Add(dao.CreateParameter("@Position",model.Position));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategoryMapLink_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductCategoryMapLinkDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategoryMapLink_GetAll");
			try
			{
						
				return dao.GetDTOList<ProductCategoryMapLinkDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static ProductCategoryMapLinkDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategoryMapLink_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<ProductCategoryMapLinkDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(ProductCategoryMapLinkDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductCategoryMapLink_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@CategoryId",model.CategoryId));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@Url",model.Url));
						command.Parameters.Add(dao.CreateParameter("@Position",model.Position));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class ProductCateTempMappingDb: DbBase
	{

	}
	
	public partial class ProductCommentDb: DbBase
	{

		public static int Add(ProductCommentDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductComment_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@ParentId",model.ParentId));
						command.Parameters.Add(dao.CreateParameter("@CustomerId",model.CustomerId));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@Title",model.Title));
						command.Parameters.Add(dao.CreateParameter("@Content",model.Content));
						command.Parameters.Add(dao.CreateParameter("@Email",model.Email));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@UpdateDate",model.UpdateDate));
						command.Parameters.Add(dao.CreateParameter("@Star",model.Star));
						command.Parameters.Add(dao.CreateParameter("@Agree",model.Agree));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductComment_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductCommentDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductComment_GetAll");
			try
			{
						
				return dao.GetDTOList<ProductCommentDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static ProductCommentDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductComment_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<ProductCommentDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(ProductCommentDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductComment_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@ParentId",model.ParentId));
						command.Parameters.Add(dao.CreateParameter("@CustomerId",model.CustomerId));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@Title",model.Title));
						command.Parameters.Add(dao.CreateParameter("@Content",model.Content));
						command.Parameters.Add(dao.CreateParameter("@Email",model.Email));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@UpdateDate",model.UpdateDate));
						command.Parameters.Add(dao.CreateParameter("@Star",model.Star));
						command.Parameters.Add(dao.CreateParameter("@Agree",model.Agree));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class ProductHotDb: DbBase
	{

		public static int Add(ProductHotDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductHot_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@EndDate",model.EndDate));
						command.Parameters.Add(dao.CreateParameter("@Show",model.Show));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductHot_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductHotDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductHot_GetAll");
			try
			{
						
				return dao.GetDTOList<ProductHotDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static ProductHotDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductHot_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<ProductHotDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(ProductHotDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductHot_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@EndDate",model.EndDate));
						command.Parameters.Add(dao.CreateParameter("@Show",model.Show));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class ProductImageDb: DbBase
	{

		public static int Add(ProductImageDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductImage_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@ColorId",model.ColorId));
						command.Parameters.Add(dao.CreateParameter("@Avartar",model.Avartar));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						command.Parameters.Add(dao.CreateParameter("@ImageName",model.ImageName));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						command.Parameters.Add(dao.CreateParameter("@ModifiedDate",model.ModifiedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductImage_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductImageDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductImage_GetAll");
			try
			{
						
				return dao.GetDTOList<ProductImageDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductImageDto> GetAllByProductId(string ProductId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductImage_GetAllByProductId");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@ProductId",ProductId));
						
				return dao.GetDTOList<ProductImageDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static ProductImageDto GetById(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductImage_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<ProductImageDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(ProductImageDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductImage_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@ColorId",model.ColorId));
						command.Parameters.Add(dao.CreateParameter("@Avartar",model.Avartar));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						command.Parameters.Add(dao.CreateParameter("@ImageName",model.ImageName));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						command.Parameters.Add(dao.CreateParameter("@ModifiedDate",model.ModifiedDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int UpdateAvartarStatus(ProductImageDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductImage_UpdateAvartarStatus");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class ProductSizeDb: DbBase
	{

		public static int Add(ProductSizeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductSize_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@SizeId",model.SizeId));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@SizePrice",model.SizePrice));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Show",model.Show));
						command.Parameters.Add(dao.CreateParameter("@Order",model.Order));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string SizeId,string ProductId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductSize_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@SizeId",SizeId));
						command.Parameters.Add(dao.CreateParameter("@ProductId",ProductId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductSizeDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductSize_GetAll");
			try
			{
						
				return dao.GetDTOList<ProductSizeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductSizeDto> GetAllByShowAndOrder()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductSize_GetAllByShowAndOrder");
			try
			{
						
				return dao.GetDTOList<ProductSizeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static ProductSizeDto GetById(string SizeId,string ProductId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductSize_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@SizeId",SizeId));
						command.Parameters.Add(dao.CreateParameter("@ProductId",ProductId));
						
				return dao.GetSingleDTO<ProductSizeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(ProductSizeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductSize_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@SizeId",model.SizeId));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@SizePrice",model.SizePrice));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Show",model.Show));
						command.Parameters.Add(dao.CreateParameter("@Order",model.Order));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class ProductTagDb: DbBase
	{

	}
	
	public partial class ProductTagMappingDb: DbBase
	{

	}
	
	public partial class ProductTogetherDb: DbBase
	{

		public static int Add(ProductTogetherDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductTogether_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@MappingId",model.MappingId));
						command.Parameters.Add(dao.CreateParameter("@Show",model.Show));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductTogether_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductTogetherDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductTogether_GetAll");
			try
			{
						
				return dao.GetDTOList<ProductTogetherDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static ProductTogetherDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductTogether_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<ProductTogetherDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(ProductTogetherDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductTogether_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@MappingId",model.MappingId));
						command.Parameters.Add(dao.CreateParameter("@Show",model.Show));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class ProductTypicalAttributeDb: DbBase
	{

		public static int Add(ProductTypicalAttributeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductTypicalAttribute_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						command.Parameters.Add(dao.CreateParameter("@ModifiedDate",model.ModifiedDate));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Show",model.Show));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductTypicalAttribute_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductTypicalAttributeDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductTypicalAttribute_GetAll");
			try
			{
						
				return dao.GetDTOList<ProductTypicalAttributeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProductTypicalAttributeDto> GetAllByProductId(string ProductId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductTypicalAttribute_GetAllByProductId");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@ProductId",ProductId));
						
				return dao.GetDTOList<ProductTypicalAttributeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static ProductTypicalAttributeDto GetById(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductTypicalAttribute_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<ProductTypicalAttributeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static ProductTypicalAttributeDto GetByProductId(string ProductId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductTypicalAttribute_GetByProductId");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@ProductId",ProductId));
						
				return dao.GetSingleDTO<ProductTypicalAttributeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(ProductTypicalAttributeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_ProductTypicalAttribute_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@CreatedDate",model.CreatedDate));
						command.Parameters.Add(dao.CreateParameter("@ModifiedDate",model.ModifiedDate));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Show",model.Show));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class ProviderDb: DbBase
	{

		public static int Add(ProviderDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Provider_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@ShowHome",model.ShowHome));
						command.Parameters.Add(dao.CreateParameter("@Hot",model.Hot));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Provider_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<ProviderDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Provider_GetAll");
			try
			{
						
				return dao.GetDTOList<ProviderDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static ProviderDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Provider_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<ProviderDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(ProviderDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Provider_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@ImagePath",model.ImagePath));
						command.Parameters.Add(dao.CreateParameter("@ShowHome",model.ShowHome));
						command.Parameters.Add(dao.CreateParameter("@Hot",model.Hot));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class RateDb: DbBase
	{

		public static int Add(RateDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Rate_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@CustomerId",model.CustomerId));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@Star",model.Star));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Rate_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<RateDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Rate_GetAll");
			try
			{
						
				return dao.GetDTOList<RateDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static RateDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Rate_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<RateDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(RateDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Rate_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@CustomerId",model.CustomerId));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@Star",model.Star));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class RateDetailDb: DbBase
	{

		public static int Add(RateDetailDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_RateDetail_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@Star1",model.Star1));
						command.Parameters.Add(dao.CreateParameter("@Star2",model.Star2));
						command.Parameters.Add(dao.CreateParameter("@Star3",model.Star3));
						command.Parameters.Add(dao.CreateParameter("@Star4",model.Star4));
						command.Parameters.Add(dao.CreateParameter("@Star5",model.Star5));
						command.Parameters.Add(dao.CreateParameter("@TotalRate",model.TotalRate));
						command.Parameters.Add(dao.CreateParameter("@AverageRate",model.AverageRate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_RateDetail_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<RateDetailDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_RateDetail_GetAll");
			try
			{
						
				return dao.GetDTOList<RateDetailDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static RateDetailDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_RateDetail_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<RateDetailDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(RateDetailDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_RateDetail_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@ProductId",model.ProductId));
						command.Parameters.Add(dao.CreateParameter("@Star1",model.Star1));
						command.Parameters.Add(dao.CreateParameter("@Star2",model.Star2));
						command.Parameters.Add(dao.CreateParameter("@Star3",model.Star3));
						command.Parameters.Add(dao.CreateParameter("@Star4",model.Star4));
						command.Parameters.Add(dao.CreateParameter("@Star5",model.Star5));
						command.Parameters.Add(dao.CreateParameter("@TotalRate",model.TotalRate));
						command.Parameters.Add(dao.CreateParameter("@AverageRate",model.AverageRate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class RoleDb: DbBase
	{

		public static int Add(RoleDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Role_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@RoleName",model.RoleName));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Role_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<RoleDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Role_GetAll");
			try
			{
						
				return dao.GetDTOList<RoleDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static RoleDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Role_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<RoleDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(RoleDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Role_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@RoleName",model.RoleName));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class SeasonDb: DbBase
	{

		public static int Add(SeasonDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Season_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@SeasonName",model.SeasonName));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Season_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<SeasonDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Season_GetAll");
			try
			{
						
				return dao.GetDTOList<SeasonDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static SeasonDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Season_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<SeasonDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(SeasonDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Season_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@SeasonName",model.SeasonName));
						command.Parameters.Add(dao.CreateParameter("@Ordering",model.Ordering));
						command.Parameters.Add(dao.CreateParameter("@Description",model.Description));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class SettingDb: DbBase
	{

		public static int Add(SettingDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Setting_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@Value",model.Value));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Setting_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<SettingDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Setting_GetAll");
			try
			{
						
				return dao.GetDTOList<SettingDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static SettingDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Setting_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<SettingDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(SettingDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Setting_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@Name",model.Name));
						command.Parameters.Add(dao.CreateParameter("@Value",model.Value));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class SiteMapDb: DbBase
	{

		public static int Add(SiteMapDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_SiteMap_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@SiteMapName",model.SiteMapName));
						command.Parameters.Add(dao.CreateParameter("@SiteMapCaption",model.SiteMapCaption));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_SiteMap_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<SiteMapDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_SiteMap_GetAll");
			try
			{
						
				return dao.GetDTOList<SiteMapDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static SiteMapDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_SiteMap_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<SiteMapDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(SiteMapDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_SiteMap_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@SiteMapName",model.SiteMapName));
						command.Parameters.Add(dao.CreateParameter("@SiteMapCaption",model.SiteMapCaption));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class SizeDb: DbBase
	{

		public static int Add(SizeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Size_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@SizeName",model.SizeName));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						command.Parameters.Add(dao.CreateParameter("@Code",model.Code));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Size_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int DeleteSize(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Size_DeleteSize");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<SizeDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Size_GetAll");
			try
			{
						
				return dao.GetDTOList<SizeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static SizeDto GetById(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Size_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<SizeDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(SizeDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Size_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@SizeName",model.SizeName));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						command.Parameters.Add(dao.CreateParameter("@Code",model.Code));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class SubCategoryTemplateDb: DbBase
	{

	}
	
	public partial class TagDb: DbBase
	{

		public static int Add(TagDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Tag_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@TagName",model.TagName));
						command.Parameters.Add(dao.CreateParameter("@Type",model.Type));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Tag_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<TagDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Tag_GetAll");
			try
			{
						
				return dao.GetDTOList<TagDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static TagDto GetById(string Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Tag_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<TagDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(TagDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_Tag_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@TagName",model.TagName));
						command.Parameters.Add(dao.CreateParameter("@Type",model.Type));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class TagMapDb: DbBase
	{

		public static int Add(TagMapDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_TagMap_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@MapId",model.MapId));
						command.Parameters.Add(dao.CreateParameter("@TagId",model.TagId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(string MapId,string TagId)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_TagMap_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@MapId",MapId));
						command.Parameters.Add(dao.CreateParameter("@TagId",TagId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<TagMapDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_TagMap_GetAll");
			try
			{
						
				return dao.GetDTOList<TagMapDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class TemplateDb: DbBase
	{

	}
	
	public partial class UserDb: DbBase
	{

		public static int Add(UserDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_User_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@UserName",model.UserName));
						command.Parameters.Add(dao.CreateParameter("@Password",model.Password));
						command.Parameters.Add(dao.CreateParameter("@FullName",model.FullName));
						command.Parameters.Add(dao.CreateParameter("@Mobile",model.Mobile));
						command.Parameters.Add(dao.CreateParameter("@Email",model.Email));
						command.Parameters.Add(dao.CreateParameter("@Address",model.Address));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						command.Parameters.Add(dao.CreateParameter("@PasswordSalt",model.PasswordSalt));
						command.Parameters.Add(dao.CreateParameter("@RoleId",model.RoleId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_User_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<UserDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_User_GetAll");
			try
			{
						
				return dao.GetDTOList<UserDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static UserDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_User_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<UserDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(UserDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_User_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@UserName",model.UserName));
						command.Parameters.Add(dao.CreateParameter("@Password",model.Password));
						command.Parameters.Add(dao.CreateParameter("@FullName",model.FullName));
						command.Parameters.Add(dao.CreateParameter("@Mobile",model.Mobile));
						command.Parameters.Add(dao.CreateParameter("@Email",model.Email));
						command.Parameters.Add(dao.CreateParameter("@Address",model.Address));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@Active",model.Active));
						command.Parameters.Add(dao.CreateParameter("@PasswordSalt",model.PasswordSalt));
						command.Parameters.Add(dao.CreateParameter("@RoleId",model.RoleId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class UserRoleDb: DbBase
	{

		public static int Add(UserRoleDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_UserRole_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@RoleId",model.RoleId));
						command.Parameters.Add(dao.CreateParameter("@SiteMapId",model.SiteMapId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_UserRole_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<UserRoleDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_UserRole_GetAll");
			try
			{
						
				return dao.GetDTOList<UserRoleDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static UserRoleDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_UserRole_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<UserRoleDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(UserRoleDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_UserRole_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@RoleId",model.RoleId));
						command.Parameters.Add(dao.CreateParameter("@SiteMapId",model.SiteMapId));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	
	public partial class WebInfoDb: DbBase
	{

		public static int Add(WebInfoDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_WebInfo_Add");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@WebTitle",model.WebTitle));
						command.Parameters.Add(dao.CreateParameter("@MetaDescription",model.MetaDescription));
						command.Parameters.Add(dao.CreateParameter("@MetaKeyword",model.MetaKeyword));
						command.Parameters.Add(dao.CreateParameter("@LogoPath",model.LogoPath));
						command.Parameters.Add(dao.CreateParameter("@LogoLink",model.LogoLink));
						command.Parameters.Add(dao.CreateParameter("@Intro",model.Intro));
						command.Parameters.Add(dao.CreateParameter("@ContactInfo",model.ContactInfo));
						command.Parameters.Add(dao.CreateParameter("@FooterAddress",model.FooterAddress));
						command.Parameters.Add(dao.CreateParameter("@CategoryFooter",model.CategoryFooter));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@UpdateDate",model.UpdateDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Delete(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_WebInfo_Delete");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static List<WebInfoDto> GetAll()
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_WebInfo_GetAll");
			try
			{
						
				return dao.GetDTOList<WebInfoDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static WebInfoDto GetById(int Id)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_WebInfo_GetById");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",Id));
						
				return dao.GetSingleDTO<WebInfoDto>(ref command);
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


		public static int Update(WebInfoDto model)
		{
            var dao = SharedSqlDao;
			SqlCommand command = dao.GetDbSprocCommand("WSP_WebInfo_Update");
			try
			{
						command.Parameters.Add(dao.CreateParameter("@Id",model.Id));
						command.Parameters.Add(dao.CreateParameter("@WebTitle",model.WebTitle));
						command.Parameters.Add(dao.CreateParameter("@MetaDescription",model.MetaDescription));
						command.Parameters.Add(dao.CreateParameter("@MetaKeyword",model.MetaKeyword));
						command.Parameters.Add(dao.CreateParameter("@LogoPath",model.LogoPath));
						command.Parameters.Add(dao.CreateParameter("@LogoLink",model.LogoLink));
						command.Parameters.Add(dao.CreateParameter("@Intro",model.Intro));
						command.Parameters.Add(dao.CreateParameter("@ContactInfo",model.ContactInfo));
						command.Parameters.Add(dao.CreateParameter("@FooterAddress",model.FooterAddress));
						command.Parameters.Add(dao.CreateParameter("@CategoryFooter",model.CategoryFooter));
						command.Parameters.Add(dao.CreateParameter("@CreateDate",model.CreateDate));
						command.Parameters.Add(dao.CreateParameter("@UpdateDate",model.UpdateDate));
						int result = command.ExecuteNonQuery();
				return result;
			}
			finally
			{
				command.Connection.Close();
			}
		}//End method


	}
	

	public partial class AttrFilterDb: DbBase
	{
	}
	
	public partial class ColorFilterDb: DbBase
	{
	}
	
	public partial class ColorListDb: DbBase
	{
	}
	
	public partial class ContactListPaggingDb: DbBase
	{
	}
	
	public partial class CustomerPagingDb: DbBase
	{
	}
	
	public partial class GoldenTimeProductTopListDb: DbBase
	{
	}
	
	public partial class NewsCategoryInfoDb: DbBase
	{
	}
	
	public partial class NewsCategoryListAdminDb: DbBase
	{
	}
	
	public partial class NewsCategoryListMenuDb: DbBase
	{
	}
	
	public partial class NewsListAdminDb: DbBase
	{
	}
	
	public partial class NewsListHomeDb: DbBase
	{
	}
	
	public partial class NewsListOldDb: DbBase
	{
	}
	
	public partial class NewsTitleDb: DbBase
	{
	}
	
	public partial class OrderDetailProductDb: DbBase
	{
	}
	
	public partial class OrderPagingDb: DbBase
	{
	}
	
	public partial class PriceFilterDb: DbBase
	{
	}
	
	public partial class ProductAllPagingDb: DbBase
	{
	}
	
	public partial class ProductByCateTopListDb: DbBase
	{
	}
	
	public partial class ProductByCateTopListPagingDb: DbBase
	{
	}
	
	public partial class ProductCategoryBannerAdminListDb: DbBase
	{
	}
	
	public partial class ProductCategoryBannerHomeDb: DbBase
	{
	}
	
	public partial class ProductCategoryBannerWidthDb: DbBase
	{
	}
	
	public partial class ProductCategoryByNameDb: DbBase
	{
	}
	
	public partial class ProductCategoryByPromotionPageDb: DbBase
	{
	}
	
	public partial class ProductCategoryDropDb: DbBase
	{
	}
	
	public partial class ProductCategoryGoldenTimeDtoDb: DbBase
	{
	}
	
	public partial class ProductCategoryInfoDb: DbBase
	{
	}
	
	public partial class ProductCategoryListAdminDb: DbBase
	{
	}
	
	public partial class ProductCategoryMapLinkPagingDb: DbBase
	{
	}
	
	public partial class ProductCategoryMenuLeftDb: DbBase
	{
	}
	
	public partial class ProductCategoryOnHomeDb: DbBase
	{
	}
	
	public partial class ProductCategoryParentCateDb: DbBase
	{
	}
	
	public partial class ProductChildCateDb: DbBase
	{
	}
	
	public partial class ProductCommentListDb: DbBase
	{
	}
	
	public partial class ProductCommentListDetailDb: DbBase
	{
	}
	
	public partial class ProductDetailDb: DbBase
	{
	}
	
	public partial class ProductGoldenTimeListDb: DbBase
	{
	}
	
	public partial class ProductGoldenTimeListByCateDb: DbBase
	{
	}
	
	public partial class ProductImageHasColorInfoDb: DbBase
	{
	}
	
	public partial class ProductImageHasColorNameDb: DbBase
	{
	}
	
	public partial class ProductListByPromotionPageDb: DbBase
	{
	}
	
	public partial class ProductListForPagingDb: DbBase
	{
	}
	
	public partial class ProductListProviderHomeDb: DbBase
	{
	}
	
	public partial class ProductMenuHomeDb: DbBase
	{
	}
	
	public partial class ProductNameListDb: DbBase
	{
	}
	
	public partial class ProductPromotionTopListDb: DbBase
	{
	}
	
	public partial class ProductRateByCateTopListPagingDb: DbBase
	{
	}
	
	public partial class ProductSizeListByPidDb: DbBase
	{
	}
	
	public partial class ProductSynViewDb: DbBase
	{
	}
	
	public partial class ProviderCoutDb: DbBase
	{
	}
	
	public partial class ProviderFilterDb: DbBase
	{
	}
	
	public partial class ProviderListDb: DbBase
	{
	}
	
	public partial class ProviderListByLetterDb: DbBase
	{
	}
	
	public partial class ProviderListCateHomeDb: DbBase
	{
	}
	
	public partial class ProviderListHotCateDb: DbBase
	{
	}
	
	public partial class ProviderListNameDb: DbBase
	{
	}
	
	public partial class RateFilterDb: DbBase
	{
	}
	
	public partial class SizeFilterDb: DbBase
	{
	}
	
	public partial class SizeListDb: DbBase
	{
	}
	
	public partial class UserPagingDb: DbBase
	{
	}
	
	public partial class V_DiscountPromotionCateDb: DbBase
	{
	}
	
	public partial class V_DiscountPromotionProductDb: DbBase
	{
	}
	
	public partial class V_GiftPromotionCateDb: DbBase
	{
	}
	
	public partial class V_GiftPromotionProductDb: DbBase
	{
	}
	
	public partial class VCProCateTempMappingDb: DbBase
	{
	}
	
	public partial class ViewBannerDb: DbBase
	{
	}
	
	public partial class ViewBannerClientDb: DbBase
	{
	}
	
	public partial class ViewCateTemplatePagingDb: DbBase
	{
	}
	
	public partial class ViewConfigPagingDb: DbBase
	{
	}
	
	public partial class ViewDiscountPagingDb: DbBase
	{
	}
	
	public partial class ViewGiftPagingDb: DbBase
	{
	}
	
	public partial class ViewPositionDb: DbBase
	{
	}
	
	public partial class ViewProductCateTempMappingDb: DbBase
	{
	}
	
	public partial class ViewProductDetailDb: DbBase
	{
	}
	
	public partial class ViewProductTagListDb: DbBase
	{
	}
	
	public partial class ViewSubCategoryTempJoinDb: DbBase
	{
	}
	
}
